<template>
  <div class="daily-exam-complete">
    <van-list
      v-model="loading"
      :finished="finished"
      finished-text="— 没有更多了 —"
      @load="getList"
    >
      <completedModule
        v-for="(item, index) in list"
        :key="index"
        :item="item"
      />
    </van-list>
  </div>
</template>
<script lang="ts">
import Vue from 'vue'
export default Vue.extend({
  components: {
    completedModule: () => import('components/Exam/DailyExam/CompletedModule.vue'),
  },
  data () {
    return {
      list: [
        {
          rate: 70,
          time: '2019-04-09',
          haveDonePeople: 2,
          examStatus: 1,
        },
        {
          rate: 50,
          time: '2019-04-19',
          haveDonePeople: 10,
          examStatus: 1,
        },
        {
          rate: 0,
          time: '2019-04-09',
          haveDonePeople: 10,
          examStatus: 0,
        },
      ],
      loading: true,
      finished: false,
      currentRate: 0,
    }
  },
  created () {
    this.loading = false
  },
  methods: {
    getList () {
      this.loading = false
      this.finished = true
    },
  },
})
</script>

<style lang="scss" scoped>
.daily-exam-complete {
  min-height: 100%;
  background-color: #fff;
}
</style>
